﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ShopOnline.BLL;

public partial class Controls_Banner : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadData();
        }
    }

    private void LoadData()
    {
        ShopOnline.BLL.SlideShow slides = SlideShow.GetAllActive();
        if (slides.RowCount > 0)
        {
            rptMain.DataSource = slides.DefaultView;
            rptMain.DataBind();
        }
    }
}